package com.gy.api;

import com.aaa.entity.DictData;
import com.aaa.vo.Result;
import com.gy.service.DictDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author GaoYa
 * @Date 2023/3/24 16:22
 * @Version 1.5
 */
@RestController
@RequestMapping("/charge/api/item/")
public class DictDataController {
    @Autowired
    private DictDataService dictDataService;

    /**
     * 字典表查询返回状态
     * @param type
     * @return
     */
    @GetMapping("findAllByType/{type}")
    public Result<List<DictData>> findAllByType(@PathVariable String type) {
            return dictDataService.findAllByType(type);
    }

}
